<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="en">
<!-- [Head] start -->

<head>
    <script src="/myhouse/static/ueditor/ueditor.config.js" type="text/javascript"></script>
    <script src="/myhouse/static/ueditor/ueditor.all.js" type="text/javascript"></script>
    <script src="/myhouse/static/mediator/js/jquery-3.2.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/myhouse/static/mediator/js/jquery-3.2.1.min.js"></script>
    <title>Typography | Berry Bootstrap 5 Admin Template</title>
    <!-- [Meta] -->
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta
            name="description"
            content="Berry is made using Bootstrap 5 design framework. Download the free admin template & use it for your project."
    />
    <meta name="keywords" content="Berry, Dashboard UI Kit, Bootstrap 5, Admin Template, Admin Dashboard, CRM, CMS, Bootstrap Admin Template" />

    <!-- [Favicon] icon -->
    <link rel="icon" href="/myhouse/static/mediator/images/favicon.svg" type="image/x-icon" />
    <!-- [Google Font] Family -->
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" id="main-font-link" />
    <!-- [Tabler Icons] https://tablericons.com -->
    <link rel="stylesheet" href="/myhouse/static/mediator/fonts/tabler-icons.min.css" />
    <!-- [Material Icons] https://fonts.google.com/icons -->
    <link rel="stylesheet" href="/myhouse/static/mediator/fonts/material.css" />
    <!-- [Template CSS Files] -->
    <link rel="stylesheet" href="/myhouse/static/mediator/css/style.css" id="main-style-link" />
    <link rel="stylesheet" href="/myhouse/static/mediator/css/style-preset.css" id="preset-style-link" />

</head>
<!-- [Head] end -->
<!-- [Body] Start -->

<body>
<!-- [ Pre-loader ] start -->
<div class="loader-bg">
    <div class="loader-track">
        <div class="loader-fill"></div>
    </div>
</div>
<!-- [ Pre-loader ] End -->
<!-- [ Header Topbar ] start -->
<jsp:include page="/inc/mediatorTop.jsp"></jsp:include>
<!-- [ Header ] end -->
<!-- [ Sidebar Menu ] start -->
<nav class="pc-sidebar">
    <div class="navbar-wrapper">
        <div class="m-header">
            <a href="index.jsp" class="b-brand">
                <!-- ========   Change your logo from here   ============ -->
                <img src="/myhouse/static/mediator/images/logo-dark.svg" alt="" class="logo logo-lg" />
            </a>
        </div>
        <jsp:include page="/inc/mediatorLeft.jsp"></jsp:include>
    </div>
</nav>
<style type="text/css">
    /*#title{*/
    /*    width: 900px;*/
    /*    height: 400px;*/
    /*}*/
    table{
        font-size: 20px;
    }
    tr{
        height: 50px;
    }
</style>

<script type="text/javascript">
    var editor;
    $(function (){
        var op = {
            initialFrameHeight:400,
            initialFrameWidth:900,
            toolbars:[
                ['fontfamily','|','fontsize',"|","forecolor","|",'paragraph',"|","bold","|","italic","|","indent","|"],
                ['simpleupload',"|",'insertimage',"|","tolowercase","|","touppercase","|","undo","|","redo","|"],
                ['justifyleft',"|","justifyright","|","justifycenter","|","justifyjustify","|","rowspacingtop","|","rowspacingbottom","|"]
            ]
        }
        editor = UE.getEditor("title",op);
    });
</script>
<div class="pc-container">
    <div class="pc-content">
        <!-- [ breadcrumb ] start -->
        <div class="page-header">
            <div class="page-block">
                <div class="row align-items-center">
                    <div class="col-md-12">
                        <div class="page-header-title">
                            <h5 class="m-b-10">查看所有房屋信息</h5>
                        </div>
                        <ul class="breadcrumb">
                            <li class="breadcrumb-item"><a href="/myhouse/mediator/index">首页</a></li>
                            <li class="breadcrumb-item"><a href="javascript: void(0)">ISSUE</a></li>
                            <li class="breadcrumb-item" aria-current="page">处理用户问题</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <!-- [ sample-page ] start -->
            <div class="col-sm-12">
                <div class="card">
                    <div class="card-header">
                        <h5>处理用户问题</h5>
                    </div>

                    <div class="card-body" style="height: 900px;">
                        <c:if test="${ empty sessionScope.mediator}">
                            <span style="font-size: 50px; margin-left: 500px;  ">请先登录</span>
                        </c:if>
                        <c:if test="${not empty sessionScope.mediator}">
                            <form id="myform" action="/myhouse/mediator/found" method="post">
                                <input type="hidden" value="${requestScope.contact.id}" name="id">
                                <table width="100%">
                                    <tr>
                                        <th>用户姓名</th>
                                        <td> <input type="text" value="${requestScope.contact.user.userName}" disabled ></td>

                                    </tr>
                                    <tr>
                                        <th>用户反馈内容:</th>
                                        <td> ${requestScope.contact.content}</td>
                                    </tr>
                                </table>
                                <br><br>
                                <span style="font-size: 20px">您的回复：</span><br><br>
                                <textarea style="width: 90%; height: 300px; resize: none; font-size: 20px" id="hf" name="reply" >
                                        ${requestScope.contact.reply}
                                </textarea><br><br>
                                <span id="span"></span><br><br>
                                <input type="submit" value="提交" style="margin-left: 500px">
                            </form>
                        </c:if>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">
            $(function (){
                $("#hf").val($("#hf").val().replace(/\s+/g,''));
                $("#fh").click(function (){
                    location.href = "/myhouse/manager/userFeedBack";
                });
                $("#myform").submit(function (){
                    if ($("#hf").val() != ""){
                        return true;
                    }else {
                        return false;
                    }
                });
            });
        </script>
    </div>
</div>
<!-- Required Js -->
<script src="/myhouse/static/mediator/js/plugins/popper.min.js"></script>
<script src="/myhouse/static/mediator/js/plugins/simplebar.min.js"></script>
<script src="/myhouse/static/mediator/js/plugins/bootstrap.min.js"></script>
<script src="/myhouse/static/mediator/js/config.js"></script>
<script src="/myhouse/static/mediator/js/pcoded.js"></script>

<script src="/myhouse/static/mediator/js/plugins/clipboard.min.js"></script>
<script>
    window.addEventListener('load', (event) => {
        var i_clip = new ClipboardJS('.color-block');
        i_clip.on('success', function (e) {
            var targetElement = e.trigger;
            let icon_badge = document.createElement('span');
            icon_badge.setAttribute('class', 'ic-badge badge bg-success float-end');
            icon_badge.innerHTML = "copied";
            targetElement.append(icon_badge);
            setTimeout(function () {
                targetElement.children[0].remove();
            }, 3000);
        });

        i_clip.on('error', function (e) {
            var targetElement = e.trigger;
            let icon_badge = document.createElement('span');
            icon_badge.setAttribute('class', 'ic-badge badge bg-danger float-end');
            icon_badge.innerHTML = "Error";
            targetElement.append(icon_badge);
            setTimeout(function () {
                targetElement.children[0].remove();
            }, 3000);
        });
    });
</script>
</body>
</html>
